package model

import (
	"enjoy_wangyashuo/internal/model/good"
	"enjoy_wangyashuo/internal/model/mysql"
	"enjoy_wangyashuo/internal/model/user"
	"gorm.io/gorm"
)

func AoMigration() error {
	return mysql.WithMysql(func(db *gorm.DB) error {
		return db.AutoMigrate(
			&user.User{},
			&user.UserAddress{},
			&good.Goods{},
			&good.GoodSku{},
			&good.GoodsCategory{},
			&good.GoodsProperty{},
			&good.GoodsPropertyValue{},
		)
	})
}
